﻿@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
    Layout = null;
}
<link href="~/lib/layui/css/layui.css" rel="stylesheet" />
<script src="~/lib/layui/layui.js"></script>
<script src="~/js/js.cookie.js"></script>
<script src="~/js/moment.js"></script>
<script src="~/lib/jquery/dist/jquery.js"></script>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>企业列表</title>
</head>
<body>
    <table class="layui-table" height: 315>
        <colgroup>
            <col width="150">
            <col width="150">
            <col width="150">
            <col width="150">
            <col width="150">
            <col width="150">
            <col width="150">
            <col width="150">
        </colgroup>
        <thead>
            <tr>
                <th>企业全称</th>
                <th>企业简称</th>
                <th>行业标签</th>
                <th>详细地址</th>
                <th>企业电话</th>
                <th>社会信用代码</th>
                <th>描述</th>
            </tr>
        </thead>
        <tbody id="thisTd">
        </tbody>
    </table>

<script>
    $(function () {
        getPerList();
    })

    function getPerList() {
        $.ajax({
                url: '@ViewBag.FoundationWrite' + "/api/Jocker/EnterpriseList",
            type: "post",
            data: JSON.stringify({}),
            contentType: "application/json",
            success: function (res) {
                console.log(res)
                $(res).each(function () {
                    $("#thisTd").append(`<tr>
                    <td>${this.enterpriseName}</td>
                    <td>${this.enterpriseSname}</td>
                    <td>${this.enterpriseLabel}</td>
                    <td>${this.enterpriseHome}</td>
                    <td>${this.enterprisePhone}</td>
                    <td>${this.enterpriseUsci}</td>
                    <td>${this.enterpriseDescribe}</td> </tr>`)
                })
            }
        })
    }
</script>
</body>
</html>